FROM golang:1.15-buster as builder

COPY . /src

ENV GO111MODULE "on"

WORKDIR /src

RUN go build -o "/testServer" /src/*.go \
&& chmod +x /testServer




FROM debian:buster


COPY --from=builder /testServer /testServer

ENTRYPOINT ["/testServer"]

CMD ["8000","8080"]
